package site.duanzy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.web.multipart.MultipartResolver;
import site.duanzy.upload.CustomMultipartResolver;

/**
 * @author leo
 */
@SpringBootApplication
@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
public class UploadfileApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(UploadfileApplication.class, args);
	}


	@Bean(name = "multipartResolver")
	public MultipartResolver multipartResolver() {
		CustomMultipartResolver customMultipartResolver = new CustomMultipartResolver();
		return customMultipartResolver;
	}

}
